package com.datong.server.decorator;

import com.datong.server.decorator.dressup.*;

//装饰模式主类
public class DressMain {
    public static void main(String[]args){
        Person person = new Person("小航");

        PersonCoat coat = new PersonCoat();
        PersonHat hat = new PersonHat();
        PersonPants pants = new PersonPants();
        PersonShoes shoes = new PersonShoes();

        coat.decorate(person);
        hat.decorate(coat);
        pants.decorate(hat);
        shoes.decorate(pants);
        shoes.show();

    }
}
